/*
 ============================================================================
 Name		: iReadPlugin.cpp
 Author	  : 
 Copyright   : Copyright 2009
 readever.cn
 Description : CiReadPlugin DLL source
 曾经设置heap为10M,结果到了主程序就down掉.现在是1M
 ============================================================================
 */

//  Include Files  
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>


#include "iReadPlugin.h"	// CiReadPlugin
#include "iReadPlugin.pan"	  	// panic codes
#include "MyDataCenter.h"


#include <EIKENV.H>
MyDataCenter* iDataCenter = NULL;

//  Member Functions
EXPORT_C MMyDll* CiReadPlugin::NewL()
	{
	return new CiReadPlugin();
	}

CiReadPlugin::CiReadPlugin()
// note, CBase initialises all member variables to zero
	{
	iDataCenter = MyDataCenter::NewL();
	iData = 888;
	}

CiReadPlugin::~CiReadPlugin()
	{
	CEikonEnv::Static()->InfoWinL(_L("test"), _L("iReadPlugin descontruct"));
	delete iDataCenter;
	}

TInt CiReadPlugin::Load(CHtmlControl* aHtmlControl, MPluginObserver* aObserver)
	{
	iDataCenter->Init(aHtmlControl, aObserver);
	//CEikonEnv::Static()->InfoWinL(_L("test"), _L("iRead Plugin been loaded"));
	return iData;
	}
